import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    cityList:[],
    userInfo:{},
    primary:'',
    sxy:false,
    volume:0.5,
    footPlayer:true,
    playerBtm:'45px',
    list:[],
    current:0,
    i:0,
    first:true,
    progress:0,
    stop:false,
    showList:false,
    showPlayer:false,
    timer: "",
  },
  mutations: {
    setCityList(state,payload){
      state.cityList = payload;
    },
    setUserInfo(state,payload){
      state.userInfo = {...state.userInfo,...payload}
    },
    setPrimary(state,payload){
      state.primary = payload
    },
    setSxy(state,payload){
      state.sxy = payload
    },
    setVolume(state,payload){
      state.volume = payload
    },
    setFootPlayer(state,payload){
      state.footPlayer = payload
    },
    setPlayerBtm(state,payload){
      state.playerBtm = payload
    },
    setList(state,payload){
      state.list = [...payload]
    },
    setI(state,payload){
      state.i = payload
    },
    setCurrent(state,payload){
      state.current = payload
    },
    setFirst(state,payload){
      state.first = payload
    },
    setProgress(state,payload){
      state.progress = payload
    },
    setStop(state,payload){
      state.stop = payload
    },
    setShowList(state,payload){
      state.showList = payload
    },
    setShowPlayer(state,payload){
      state.showPlayer = payload
    },
    setTimer(state,payload){
      state.timer = payload
    },
  },
  actions: {
  },
  modules: {
  }
})
